home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / vim.vim < prev    next >
Encoding:
Text File  |  2001-09-20  |  48.3 KB  |  848 lines

  1. " Vim syntax file
  2. " Language:    Vim 6.0ax script
  3. " Maintainer:    Dr. Charles E. Campbell, Jr. <Charles.E.Campbell.1@gsfc.nasa.gov>
  4. " Last Change:    September 20, 2001
  5. " Version:    6.0ax-01
  6.  
  7. " Quit when a syntax file was already loaded
  8. if exists("b:current_syntax")
  9.   finish
  10. endif
  11.  
  12. " vimTodo: contains common special-notices for comments
  13. "          Use the vimCommentGroup cluster to add your own.
  14. syn keyword vimTodo contained    COMBAK    NOT    RELEASED    TODO
  15. syn cluster vimCommentGroup    contains=vimTodo
  16.  
  17. " regular vim commands
  18. syn keyword vimCommand contained    DeleteFirst    compiler    il[ist]    prompt    so[urce]
  19. syn keyword vimCommand contained    N[ext]    conf[irm]    imapc[lear]    promptf[ind]    sp[lit]
  20. syn keyword vimCommand contained    Nread    con[tinue]    inorea[bbrev]    promptr[epl]    spr[evious]
  21. syn keyword vimCommand contained    Nw    cope[n]    is[earch]    ps[earch]    sr[ewind]
  22. syn keyword vimCommand contained    P[rint]    co[py]    isp[lit]    ptN[ext]    sta[g]
  23. syn keyword vimCommand contained    X    cp[revious]    iuna[bbrev]    pta[g]    star[tinsert]
  24. syn keyword vimCommand contained    ab[breviate]    cq[uit]    iu[nmap]    ptf[irst]    stj[ump]
  25. syn keyword vimCommand contained    abc[lear]    cr[ewind]    iunme    ptj[ump]    st[op]
  26. syn keyword vimCommand contained    abo[veleft]    cuna[bbrev]    iunmenu    ptl[ast]    sts[elect]
  27. syn keyword vimCommand contained    aboveright    cu[nmap]    j[oin]    ptn[ext]    sun[hide]
  28. syn keyword vimCommand contained    al[l]    cunme    ju[mps]    ptp[revious]    sus[pend]
  29. syn keyword vimCommand contained    arga[dd]    cunmenu    k    ptr[ewind]    sv[iew]
  30. syn keyword vimCommand contained    argd[elete]    cw[indow]    lan[guage]    pts[elect]    syncbind
  31. syn keyword vimCommand contained    argdo    delc[ommand]    la[st]    pu[t]    t
  32. syn keyword vimCommand contained    arge[dit]    d[elete]    lc[d]    pw[d]    tN[ext]
  33. syn keyword vimCommand contained    argg[lobal]    delf[unction]    lch[dir]    pyf[ile]    ta[g]
  34. syn keyword vimCommand contained    argl[ocal]    diffg[et]    le[ft]    py[thon]    tags
  35. syn keyword vimCommand contained    ar[gs]    diffpatch    lefta[bove]    qa[ll]    tc[l]
  36. syn keyword vimCommand contained    argu[ment]    diffpu[t]    leftbelow    q[uit]    tcld[o]
  37. syn keyword vimCommand contained    as[cii]    diffsplit    l[ist]    quita[ll]    tclf[ile]
  38. syn keyword vimCommand contained    aun    diffthis    lm[ap]    r[ead]    te[aroff]
  39. syn keyword vimCommand contained    aunmenu    dig[raphs]    lmapc[lear]    rec[over]    tf[irst]
  40. syn keyword vimCommand contained    bN[ext]    di[splay]    lno[remap]    redi[r]    tj[ump]
  41. syn keyword vimCommand contained    bad[d]    dj[ump]    lo[adview]    red[o]    tl[ast]
  42. syn keyword vimCommand contained    ba[ll]    dl[ist]    ls    redr[aw]    tm[enu]
  43. syn keyword vimCommand contained    bd[elete]    dr[op]    lu[nmap]    reg[isters]    tn[ext]
  44. syn keyword vimCommand contained    belowleft    ds[earch]    mak[e]    res[ize]    to[pleft]
  45. syn keyword vimCommand contained    bel[owright]    dsp[lit]    ma[rk]    ret[ab]    tp[revious]
  46. syn keyword vimCommand contained    bf[irst    echoe[rr]    marks    retu[rn]    tr[ewind]
  47. syn keyword vimCommand contained    bl[ast]    echom[sg]    mat[ch]    rew[ind]    ts[elect]
  48. syn keyword vimCommand contained    bm[odified]    echon    menu-disable    ri[ght]    tu[nmenu]
  49. syn keyword vimCommand contained    bn[ext]    e[dit]    menu-enable    rightabove    una[bbreviate]
  50. syn keyword vimCommand contained    bo[tright]    el[se]    menu-<script>    rightb[elow]    u[ndo]
  51. syn keyword vimCommand contained    bp[revious]    elsei[f]    menu-script    rub[y]    unh[ide]
  52. syn keyword vimCommand contained    brea[k]    em[eenu]    menu-<silent>    rubyd[o]    unm[ap]
  53. syn keyword vimCommand contained    breaka[dd]    emenu    menu-silent    rubyf[ile]    unme
  54. syn keyword vimCommand contained    breakd[el]    emenu*    menut[ranslate]    ru[ntime]    unmenu
  55. syn keyword vimCommand contained    breakl[ist]    endf[unction]    mk[exrc]    rv[iminfo]    verb[ose]
  56. syn keyword vimCommand contained    br[ewind]    en[dif]    mks[ession]    sN[ext]    ve[rsion]
  57. syn keyword vimCommand contained    bro[wse]    endw[hile]    mkvie[w]    sal[l]    vert[ical]
  58. syn keyword vimCommand contained    bufdo    ene[w]    mkv[imrc]    sa[rgument]    v[global]
  59. syn keyword vimCommand contained    b[uffer]    ex    mod[e]    sav[eas]    vie[w]
  60. syn keyword vimCommand contained    buffers    exi[t]    m[ove]    sbN[ext]    vi[sual]
  61. syn keyword vimCommand contained    bun[load]    f[ile]    new    sba[ll]    vmapc[lear]
  62. syn keyword vimCommand contained    bw[ipeout]    files    n[ext]    sbf[irst]    vne[w]
  63. syn keyword vimCommand contained    cN[ext]    filetype    nmapc[lear]    sbl[ast]    vs[plit]
  64. syn keyword vimCommand contained    ca[bbrev]    fin[d]    noh[lsearch]    sbm[odified]    vu[nmap]
  65. syn keyword vimCommand contained    cabc[lear]    fini[sh]    norea[bbrev]    sbn[ext]    vunme
  66. syn keyword vimCommand contained    cal[l]    fir[st]    norm[al]    sbp[revious]    vunmenu
  67. syn keyword vimCommand contained    cc    fix[del]    nu[mber]    sbr[ewind]    wN[ext]
  68. syn keyword vimCommand contained    ccl[ose]    fo[ld]    nun[map]    sb[uffer]    wa[ll]
  69. syn keyword vimCommand contained    cd    foldc[lose]    nunme    scripte[ncoding]    wh[ile]
  70. syn keyword vimCommand contained    ce[nter]    folddoc[losed]    nunmenu    scrip[tnames]    win
  71. syn keyword vimCommand contained    cf[ile]    foldd[oopen]    omapc[lear]    se[t]    winc[md]
  72. syn keyword vimCommand contained    cfir[st]    foldo[pen]    on[ly]    setf[iletype]    windo
  73. syn keyword vimCommand contained    c[hange]    fu[nction]    o[pen]    setg[lobal]    winp[os]
  74. syn keyword vimCommand contained    chd[ir]    g[lobal]    opt[ions]    setl[ocal]    winpos*
  75. syn keyword vimCommand contained    che[ckpath]    go[to]    ou[nmap]    sf[ind]    win[size]
  76. syn keyword vimCommand contained    checkt[ime]    gr[ep]    ounme    sfir[st    wn[ext]
  77. syn keyword vimCommand contained    cla[st]    grepa[dd]    ounmenu    sh[ell]    wp[revous]
  78. syn keyword vimCommand contained    cl[ist]    ha[rdcopy]    pc[lose]    sign    wq
  79. syn keyword vimCommand contained    clo[se]    h[elp]    ped[it]    sil[ent]    wqa[ll]
  80. syn keyword vimCommand contained    cmapc[lear]    helpf[ind]    pe[rl]    si[malt]    w[rite]
  81. syn keyword vimCommand contained    cnew[er]    helpt[ags]    perld[o]    sla[st]    ws[verb]
  82. syn keyword vimCommand contained    cn[ext]    hid[e]    po[p]    sl[eep]    wv[iminfo]
  83. syn keyword vimCommand contained    cnf[ile]    his[tory]    pop[up]    sm[agic]    xa[ll]
  84. syn keyword vimCommand contained    cnorea[bbrev]    ia[bbrev]    pp[op]    sn[ext]    x[it]
  85. syn keyword vimCommand contained    col[der]    iabc[lear]    pre[serve]    sni[ff]    y[ank]
  86. syn keyword vimCommand contained    colo[rscheme]    if    prev[ious]    sno[magic]    z[+-^.=]
  87. syn keyword vimCommand contained    comc[lear]    ij[ump]    p[rint]
  88. syn match   vimCommand contained    "\<z[-+^.=]"
  89.  
  90. " vimOptions are caught only when contained in a vimSet
  91. syn keyword vimOption contained    :    ead    imcmdline    pdev    swb
  92. syn keyword vimOption contained    ai    eadirection    imd    pex    swf
  93. syn keyword vimOption contained    akm    eb    imdisable    pexpr    switchbuf
  94. syn keyword vimOption contained    al    ed    imi    pfn    sws
  95. syn keyword vimOption contained    aleph    edcompatible    iminsert    pheader    sxq
  96. syn keyword vimOption contained    allowrevins    ef    ims    pm    syn
  97. syn keyword vimOption contained    altkeymap    efm    imsearch    popt    syntax
  98. syn keyword vimOption contained    ar    ei    inc    previewheight    ta
  99. syn keyword vimOption contained    ari    ek    include    previewwindow    tabstop
  100. syn keyword vimOption contained    autoindent    enc    includeexpr    printdevice    tag
  101. syn keyword vimOption contained    autoread    encoding    incsearch    printexpr    tagbsearch
  102. syn keyword vimOption contained    autowrite    endofline    inde    printfont    taglength
  103. syn keyword vimOption contained    autowriteall    eol    indentexpr    printheader    tagrelative
  104. syn keyword vimOption contained    aw    ep    indentkeys    printoptions    tags
  105. syn keyword vimOption contained    awa    equalalways    indk    pt    tagstack
  106. syn keyword vimOption contained    background    equalprg    inex    pvh    tb
  107. syn keyword vimOption contained    backspace    errorbells    inf    pvw    tbi
  108. syn keyword vimOption contained    backup    errorfile    infercase    readonly    tbs
  109. syn keyword vimOption contained    backupcopy    errorformat    insertmode    remap    tenc
  110. syn keyword vimOption contained    backupdir    esckeys    is    report    term
  111. syn keyword vimOption contained    backupext    et    isf    restorescreen    termencoding
  112. syn keyword vimOption contained    backupskip    eventignore    isfname    revins    terse
  113. syn keyword vimOption contained    balloondelay    ex    isi    ri    textauto
  114. syn keyword vimOption contained    ballooneval    expandtab    isident    rightleft    textmode
  115. syn keyword vimOption contained    bdir    exrc    isk    rl    textwidth
  116. syn keyword vimOption contained    bdlay    fcl    iskeyword    ro    tf
  117. syn keyword vimOption contained    beval    fcs    isp    rs    tgst
  118. syn keyword vimOption contained    bex    fdc    isprint    rtp    thesaurus
  119. syn keyword vimOption contained    bg    fde    joinspaces    ru    tildeop
  120. syn keyword vimOption contained    bh    fdi    js    ruf    timeout
  121. syn keyword vimOption contained    bin    fdl    key    ruler    timeoutlen
  122. syn keyword vimOption contained    binary    fdls    keymap    rulerformat    title
  123. syn keyword vimOption contained    biosk    fdm    keymodel    runtimepath    titlelen
  124. syn keyword vimOption contained    bioskey    fdn    keywordprg    sb    titleold
  125. syn keyword vimOption contained    bk    fdo    km    sbo    titlestring
  126. syn keyword vimOption contained    bkc    fdt    kmp    sbr    tl
  127. syn keyword vimOption contained    bl    fen    kp    sc    tm
  128. syn keyword vimOption contained    bomb    fenc    langmap    scb    to
  129. syn keyword vimOption contained    breakat    fencs    langmenu    scr    toolbar
  130. syn keyword vimOption contained    brk    ff    laststatus    scroll    top
  131. syn keyword vimOption contained    browsedir    ffs    lazyredraw    scrollbind    tr
  132. syn keyword vimOption contained    bs    fileencoding    lbr    scrolljump    ts
  133. syn keyword vimOption contained    bsdir    fileencodings    lcs    scrolloff    tsl
  134. syn keyword vimOption contained    bsk    fileformat    linebreak    scrollopt    tsr
  135. syn keyword vimOption contained    bt    fileformats    lines    scs    ttimeout
  136. syn keyword vimOption contained    bufhidden    filetype    linespace    sect    ttimeoutlen
  137. syn keyword vimOption contained    buflisted    fillchars    lisp    sections    ttm
  138. syn keyword vimOption contained    buftype    fk    lispwords    secure    tty
  139. syn keyword vimOption contained    cb    fkmap    list    sel    ttybuiltin
  140. syn keyword vimOption contained    ccv    fml    listchars    selection    ttyfast
  141. syn keyword vimOption contained    cd    fmr    lm    selectmode    ttym
  142. syn keyword vimOption contained    cdpath    fo    lmap    sessionoptions    ttymouse
  143. syn keyword vimOption contained    cedit    foldclose    loadplugins    sft    ttyscroll
  144. syn keyword vimOption contained    cf    foldcolumn    lpl    sh    ttytype
  145. syn keyword vimOption contained    ch    foldenable    ls    shcf    tw
  146. syn keyword vimOption contained    charconvert    foldexpr    lsp    shell    tx
  147. syn keyword vimOption contained    cin    foldignore    lw    shellcmdflag    uc
  148. syn keyword vimOption contained    cindent    foldlevel    lz    shellpipe    ul
  149. syn keyword vimOption contained    cink    foldlevelstart    ma    shellquote    undolevels
  150. syn keyword vimOption contained    cinkeys    foldmarker    magic    shellredir    updatecount
  151. syn keyword vimOption contained    cino    foldmethod    makeef    shellslash    updatetime
  152. syn keyword vimOption contained    cinoptions    foldminlines    makeprg    shelltype    ut
  153. syn keyword vimOption contained    cinw    foldnestmax    mat    shellxquote    vb
  154. syn keyword vimOption contained    cinwords    foldopen    matchpairs    shiftround    vbs
  155. syn keyword vimOption contained    clipboard    foldtext    matchtime    shiftwidth    vdir
  156. syn keyword vimOption contained    cmdheight    formatoptions    maxfuncdepth    shm    ve
  157. syn keyword vimOption contained    cmdwinheight    formatprg    maxmapdepth    shortmess    verbose
  158. syn keyword vimOption contained    cms    fp    maxmem    shortname    vi
  159. syn keyword vimOption contained    co    ft    maxmemtot    showbreak    viewdir
  160. syn keyword vimOption contained    columns    gcr    mef    showcmd    viewoptions
  161. syn keyword vimOption contained    com    gd    menuitems    showfulltag    viminfo
  162. syn keyword vimOption contained    comments    gdefault    mfd    showmatch    virtualedit
  163. syn keyword vimOption contained    commentstring    gfm    mh    showmode    visualbell
  164. syn keyword vimOption contained    compatible    gfn    mis    shq    vop
  165. syn keyword vimOption contained    complete    gfs    ml    si    wa
  166. syn keyword vimOption contained    confirm    gfw    mls    sidescroll    wak
  167. syn keyword vimOption contained    consk    ghr    mm    sidescrolloff    warn
  168. syn keyword vimOption contained    conskey    go    mmd    siso    wb
  169. syn keyword vimOption contained    cp    gp    mmt    sj    wc
  170. syn keyword vimOption contained    cpo    grepformat    mod    slm    wcm
  171. syn keyword vimOption contained    cpoptions    grepprg    modeline    sm    wd
  172. syn keyword vimOption contained    cpt    guicursor    modelines    smartcase    weirdinvert
  173. syn keyword vimOption contained    cscopepathcomp    guifont    modifiable    smartindent    wh
  174. syn keyword vimOption contained    cscopeprg    guifontset    modified    smarttab    whichwrap
  175. syn keyword vimOption contained    cscopetag    guifontwide    more    smd    wig
  176. syn keyword vimOption contained    cscopetagorder    guiheadroom    mouse    sn    wildchar
  177. syn keyword vimOption contained    cscopeverbose    guioptions    mousef    so    wildcharm
  178. syn keyword vimOption contained    cspc    guipty    mousefocus    softtabstop    wildignore
  179. syn keyword vimOption contained    csprg    helpfile    mousehide    sol    wildmenu
  180. syn keyword vimOption contained    cst    helpheight    mousem    sp    wildmode
  181. syn keyword vimOption contained    csto    hf    mousemodel    splitbelow    wim
  182. syn keyword vimOption contained    csverb    hh    mouses    splitright    winaltkeys
  183. syn keyword vimOption contained    cwh    hi    mouseshape    spr    winheight
  184. syn keyword vimOption contained    debug    hid    mouset    sr    winminheight
  185. syn keyword vimOption contained    deco    hidden    mousetime    srr    winminwidth
  186. syn keyword vimOption contained    def    highlight    mp    ss    winwidth
  187. syn keyword vimOption contained    define    history    mps    ssl    wiv
  188. syn keyword vimOption contained    delcombine    hk    nf    ssop    wiw
  189. syn keyword vimOption contained    dex    hkmap    nrformats    st    wm
  190. syn keyword vimOption contained    dg    hkmapp    nu    sta    wmh
  191. syn keyword vimOption contained    dict    hkp    number    startofline    wmnu
  192. syn keyword vimOption contained    dictionary    hl    oft    statusline    wmw
  193. syn keyword vimOption contained    diff    hls    osfiletype    stl    wrap
  194. syn keyword vimOption contained    diffexpr    hlsearch    pa    sts    wrapmargin
  195. syn keyword vimOption contained    diffopt    ic    para    su    wrapscan
  196. syn keyword vimOption contained    digraph    icon    paragraphs    sua    write
  197. syn keyword vimOption contained    dip    iconstring    paste    suffixes    writeany
  198. syn keyword vimOption contained    dir    ignorecase    pastetoggle    suffixesadd    writebackup
  199. syn keyword vimOption contained    directory    im    patchexpr    sw    writedelay
  200. syn keyword vimOption contained    display    imactivatekey    patchmode    swapfile    ws
  201. syn keyword vimOption contained    dy    imak    path    swapsync    ww
  202. syn keyword vimOption contained    ea    imc
  203.  
  204. " These are the turn-off setting variants
  205. syn keyword vimOption contained    loadplugins    nodisable    noincsearch    norightleft    nota
  206. syn keyword vimOption contained    noai    noea    noinf    norl    notagbsearch
  207. syn keyword vimOption contained    noakm    noeb    noinfercase    noro    notagrelative
  208. syn keyword vimOption contained    noallowrevins    noed    noinsertmode    nors    notagstack
  209. syn keyword vimOption contained    noaltkeymap    noedcompatible    nois    noru    notbi
  210. syn keyword vimOption contained    noar    noek    nojoinspaces    noruler    notbs
  211. syn keyword vimOption contained    noari    noendofline    nojs    nosb    noterse
  212. syn keyword vimOption contained    noautoindent    noeol    nolazyredraw    nosc    notextauto
  213. syn keyword vimOption contained    noautoread    noequalalways    nolbr    noscb    notextmode
  214. syn keyword vimOption contained    noautowrite    noerrorbells    nolinebreak    noscrollbind    notf
  215. syn keyword vimOption contained    noautowriteall    noesckeys    nolisp    noscs    notgst
  216. syn keyword vimOption contained    noaw    noet    nolist    nosecure    notildeop
  217. syn keyword vimOption contained    noawa    noex    noloadplugins    nosft    notimeout
  218. syn keyword vimOption contained    nobackup    noexpandtab    nolpl    noshellslash    notitle
  219. syn keyword vimOption contained    noballooneval    noexrc    nolz    noshiftround    noto
  220. syn keyword vimOption contained    nobeval    nofen    noma    noshortname    notop
  221. syn keyword vimOption contained    nobin    nofk    nomagic    noshowcmd    notr
  222. syn keyword vimOption contained    nobinary    nofkmap    nomh    noshowfulltag    nottimeout
  223. syn keyword vimOption contained    nobiosk    nofoldenable    noml    noshowmatch    nottybuiltin
  224. syn keyword vimOption contained    nobioskey    nogd    nomod    noshowmode    nottyfast
  225. syn keyword vimOption contained    nobk    nogdefault    nomodeline    nosi    notx
  226. syn keyword vimOption contained    nobomb    noguipty    nomodifiable    nosm    novb
  227. syn keyword vimOption contained    nocf    nohid    nomodified    nosmartcase    novisualbell
  228. syn keyword vimOption contained    nocin    nohidden    nomore    nosmartindent    nowa
  229. syn keyword vimOption contained    nocindent    nohk    nomousef    nosmarttab    nowarn
  230. syn keyword vimOption contained    nocompatible    nohkmap    nomousefocus    nosmd    nowb
  231. syn keyword vimOption contained    noconfirm    nohkmapp    nomousehide    nosn    noweirdinvert
  232. syn keyword vimOption contained    noconsk    nohkp    nonu    nosol    nowildmenu
  233. syn keyword vimOption contained    noconskey    nohls    nonumber    nosplitbelow    nowiv
  234. syn keyword vimOption contained    nocp    nohlsearch    nopaste    nosplitright    nowmnu
  235. syn keyword vimOption contained    nocscopetag    noic    nopreviewwindow    nospr    nowrap
  236. syn keyword vimOption contained    nocscopeverbose    noicon    nopvw    nosr    nowrapscan
  237. syn keyword vimOption contained    nocst    noignorecase    noreadonly    nossl    nowrite
  238. syn keyword vimOption contained    nocsverb    noim    noremap    nosta    nowriteany
  239. syn keyword vimOption contained    nodg    noimc    norestorescreen    nostartofline    nowritebackup
  240. syn keyword vimOption contained    nodiff    noimcmdline    norevins    noswapfile    nows
  241. syn keyword vimOption contained    nodigraph    noimd    nori    noswf    pvw
  242.  
  243. " termcap codes (which can also be set)
  244. syn keyword vimOption contained    t_AB    t_IS    t_KI    t_cm    t_kN    t_nd
  245. syn keyword vimOption contained    t_AF    t_K1    t_KJ    t_cs    t_kP    t_op
  246. syn keyword vimOption contained    t_AL    t_K3    t_KK    t_da    t_kb    t_se
  247. syn keyword vimOption contained    t_CS    t_K4    t_KL    t_db    t_kd    t_so
  248. syn keyword vimOption contained    t_CV    t_K5    t_RI    t_dl    t_ke    t_sr
  249. syn keyword vimOption contained    t_Co    t_K6    t_RV    t_fs    t_kh    t_te
  250. syn keyword vimOption contained    t_DL    t_K7    t_Sb    t_k1    t_kl    t_ti
  251. syn keyword vimOption contained    t_F1    t_K8    t_Sf    t_k2    t_kr    t_ts
  252. syn keyword vimOption contained    t_F2    t_K9    t_WP    t_k3    t_ks    t_ue
  253. syn keyword vimOption contained    t_F3    t_KA    t_WS    t_k4    t_ku    t_us
  254. syn keyword vimOption contained    t_F4    t_KB    t_ZH    t_k5    t_le    t_ut
  255. syn keyword vimOption contained    t_F5    t_KC    t_ZR    t_k6    t_mb    t_vb
  256. syn keyword vimOption contained    t_F6    t_KD    t_al    t_k7    t_md    t_ve
  257. syn keyword vimOption contained    t_F7    t_KE    t_bc    t_k8    t_me    t_vi
  258. syn keyword vimOption contained    t_F8    t_KF    t_cd    t_k9    t_mr    t_vs
  259. syn keyword vimOption contained    t_F9    t_KG    t_ce    t_kD    t_ms    t_xs
  260. syn keyword vimOption contained    t_IE    t_KH    t_cl    t_kI
  261. syn match   vimOption contained    "t_#2"
  262. syn match   vimOption contained    "t_#4"
  263. syn match   vimOption contained    "t_%1"
  264. syn match   vimOption contained    "t_%i"
  265. syn match   vimOption contained    "t_&8"
  266. syn match   vimOption contained    "t_*7"
  267. syn match   vimOption contained    "t_@7"
  268. syn match   vimOption contained    "t_k;"
  269.  
  270. " these settings don't actually cause errors in vim, but were supported by vi and don't do anything in vim
  271. syn keyword vimErrSetting contained    hardtabs    w1200    w9600    wi    window
  272. syn keyword vimErrSetting contained    ht    w300
  273.  
  274. " AutoBuf Events
  275. syn case ignore
  276. syn keyword vimAutoEvent contained    BufAdd    BufUnload    E200    FileReadPre    RemoteReply
  277. syn keyword vimAutoEvent contained    BufCreate    BufWinEnter    E201    FileType    StdinReadPost
  278. syn keyword vimAutoEvent contained    BufDelete    BufWinLeave    E203    FileWriteCmd    StdinReadPre
  279. syn keyword vimAutoEvent contained    BufEnter    BufWipeout    E204    FileWritePost    Syntax
  280. syn keyword vimAutoEvent contained    BufFilePost    BufWrite    EncodingChanged    FileWritePre    TermChanged
  281. syn keyword vimAutoEvent contained    BufFilePre    BufWriteCmd    FileAppendCmd    FilterReadPost    TermResponse
  282. syn keyword vimAutoEvent contained    BufHidden    BufWritePost    FileAppendPost    FilterReadPre    User
  283. syn keyword vimAutoEvent contained    BufLeave    BufWritePre    FileAppendPre    FilterWritePost    UserGettingBored
  284. syn keyword vimAutoEvent contained    BufNew    Cmd-event    FileChangedRO    FilterWritePre    VimEnter
  285. syn keyword vimAutoEvent contained    BufNewFile    CmdwinEnter    FileChangedShell    FocusGained    VimLeave
  286. syn keyword vimAutoEvent contained    BufRead    CmdwinLeave    FileEncoding    FocusLost    VimLeavePre
  287. syn keyword vimAutoEvent contained    BufReadCmd    CursorHold    FileReadCmd    FuncUndefined    WinEnter
  288. syn keyword vimAutoEvent contained    BufReadPost    E135    FileReadPost    GUIEnter    WinLeave
  289. syn keyword vimAutoEvent contained    BufReadPre    E143
  290.  
  291. " Highlight commonly used Groupnames
  292. syn keyword vimGroup contained    Comment    Identifier    Keyword    Type    Delimiter
  293. syn keyword vimGroup contained    Constant    Function    Exception    StorageClass    SpecialComment
  294. syn keyword vimGroup contained    String    Statement    PreProc    Structure    Debug
  295. syn keyword vimGroup contained    Character    Conditional    Include    Typedef    Underlined
  296. syn keyword vimGroup contained    Number    Repeat    Define    Special    Ignore
  297. syn keyword vimGroup contained    Boolean    Label    Macro    SpecialChar    Error
  298. syn keyword vimGroup contained    Float    Operator    PreCondit    Tag    Todo
  299.  
  300. " Default highlighting groups
  301. syn keyword vimHLGroup contained    Cursor    Directory    Menu    Scrollbar    Tooltip
  302. syn keyword vimHLGroup contained    CursorIM    ErrorMsg    ModeMsg    Search    VertSplit
  303. syn keyword vimHLGroup contained    DiffAdd    FoldColumn    MoreMsg    SpecialKey    Visual
  304. syn keyword vimHLGroup contained    DiffChange    Folded    NonText    StatusLine    VisualNOS
  305. syn keyword vimHLGroup contained    DiffDelete    IncSearch    Normal    StatusLineNC    WarningMsg
  306. syn keyword vimHLGroup contained    DiffText    LineNr    Question    Title    WildMenu
  307. syn case match
  308.  
  309. " Function Names
  310. syn keyword vimFuncName contained    MyCounter    exists    globpath    mapcheck    stridx
  311. syn keyword vimFuncName contained    append    expand    has    match    strlen
  312. syn keyword vimFuncName contained    argc    expandpath    hasmapto    matchend    strpart
  313. syn keyword vimFuncName contained    argidx    filereadable    histadd    matchstr    strridx
  314. syn keyword vimFuncName contained    argv    filewritable    histdel    mode    strtrans
  315. syn keyword vimFuncName contained    browse    fnamemodify    histget    nextnonblank    submatch
  316. syn keyword vimFuncName contained    bufexists    foldclosed    histnr    nr2char    substitute
  317. syn keyword vimFuncName contained    buflisted    foldclosedend    hlID    prevnonblank    synID
  318. syn keyword vimFuncName contained    bufloaded    foldlevel    hlexists    remote_expr    synIDattr
  319. syn keyword vimFuncName contained    bufname    foldtext    hostname    remote_foreground    synIDtrans
  320. syn keyword vimFuncName contained    bufnr    foreground    iconv    remote_peek    system
  321. syn keyword vimFuncName contained    bufwinnr    function    indent    remote_read    tempname
  322. syn keyword vimFuncName contained    byte2line    getbufvar    input    remote_send    tolower
  323. syn keyword vimFuncName contained    char2nr    getchar    inputdialog    rename    toupper
  324. syn keyword vimFuncName contained    cindent    getcharmod    inputsecret    resolve    type
  325. syn keyword vimFuncName contained    col    getcwd    isdirectory    search    virtcol
  326. syn keyword vimFuncName contained    confirm    getfsize    libcall    searchpair    visualmode
  327. syn keyword vimFuncName contained    cscope_connection    getftime    libcallnr    server2client    winbufnr
  328. syn keyword vimFuncName contained    delete    getline    line    serverlist    wincol
  329. syn keyword vimFuncName contained    did_filetype    getwinposx    line2byte    setbufvar    winheight
  330. syn keyword vimFuncName contained    escape    getwinposy    lispindent    setline    winline
  331. syn keyword vimFuncName contained    eventhandler    getwinvar    localtime    setwinvar    winnr
  332. syn keyword vimFuncName contained    executable    glob    maparg    strftime    winwidth
  333.  
  334. "--- syntax above generated by mkvimvim ---
  335.  
  336. " Special Vim Highlighting
  337.  
  338. " All vimCommands are contained by vimIsCommands.
  339. syn match vimCmdSep    "[:|]\+"    skipwhite nextgroup=vimAddress,vimAutoCmd,vimMark,vimFilter,vimUserCmd,vimSet,vimLet,vimCommand,vimSyntax,vimExtCmd
  340. syn match vimIsCommand    "\<\a\+\>"    contains=vimCommand
  341. syn match vimVar        "\<[bwglsav]:\K\k*\>"
  342. syn match vimVar contained    "\<\K\k*\>"
  343. syn match vimFunc        "\I\i*\s*("    contains=vimFuncName,vimCommand
  344.  
  345. " Insertions And Appends: insert append
  346. " =======================
  347. syn region vimInsert    matchgroup=vimCommand start="^[: \t]*a\%[ppend]$"    matchgroup=vimCommand end="^\.$""
  348. syn region vimInsert    matchgroup=vimCommand start="^[: \t]*i\%[nsert]$"    matchgroup=vimCommand end="^\.$""
  349.  
  350. " Behave!
  351. " =======
  352. syn match   vimBehave    "\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError
  353. syn keyword vimBehaveModel contained    mswin    xterm
  354. syn match   vimBehaveError contained    "[^ ]\+"
  355.  
  356. " Filetypes
  357. " =========
  358. syn match   vimFiletype    "\<filet\%[ype]\(\s\+\I\i*\)*\(|\|$\)"    skipwhite contains=vimFTCmd,vimFTOption,vimFTError
  359. syn match   vimFTError  contained    "\I\i*"
  360. syn keyword vimFTCmd    contained    filet[ype]
  361. syn keyword vimFTOption contained    on    off    indent    plugin
  362.  
  363. " Augroup : vimAugroupError removed because long augroups caused sync'ing problems.
  364. " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
  365. syn cluster vimAugroupList    contains=vimIsCommand,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar
  366. syn region  vimAugroup    start="\<aug\%[roup]\>\s\+\K\k*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>"    contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
  367. syn match   vimAugroupError    "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
  368. syn keyword vimAugroupKey contained    aug[roup]
  369.  
  370. " Functions : Tag is provided for those who wish to highlight tagged functions
  371. " =========
  372. syn cluster vimFuncList    contains=vimFuncKey,Tag,vimFuncSID
  373. syn cluster vimFuncBodyList    contains=vimIsCommand,vimFunction,vimFunctionError,vimFuncBody,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar
  374. syn match   vimFunctionError    "\<fu\%[nction]!\=\s\+\U.\{-}("me=e-1    contains=vimFuncKey,vimFuncBlank nextgroup=vimFuncBody
  375. syn match   vimFunction    "\<fu\%[nction]!\=\s\+\(<[sS][iI][dD]>\|s:\|\u\)\w*("me=e-1    contains=@vimFuncList nextgroup=vimFuncBody
  376. syn region  vimFuncBody  contained    start=")"    end="\<endf"    contains=@vimFuncBodyList
  377. syn match   vimFuncVar   contained    "a:\(\I\i*\|\d\+\)"
  378. syn match   vimFuncSID   contained    "<[sS][iI][dD]>\|\<s:"
  379. syn keyword vimFuncKey   contained    fu[nction]
  380. syn match   vimFuncBlank contained    "\s\+"
  381.  
  382. syn keyword vimPattern  contained    start    skip    end
  383.  
  384. " Operators
  385. syn match vimOper    "||\|&&\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|+\|-\|=\|\." skipwhite nextgroup=vimString,vimSpecFile
  386.  
  387. " Special Filenames, Modifiers, Extension Removal
  388. syn match vimSpecFile    "<c\(word\|WORD\)>"    nextgroup=vimSpecFileMod,vimSubst
  389. syn match vimSpecFile    "<\([acs]file\|amatch\|abuf\)>"    nextgroup=vimSpecFileMod,vimSubst
  390. syn match vimSpecFile    "\s%[ \t:]"ms=s+1,me=e-1    nextgroup=vimSpecFileMod,vimSubst
  391. syn match vimSpecFile    "\s%$"ms=s+1        nextgroup=vimSpecFileMod,vimSubst
  392. syn match vimSpecFile    "\s%<"ms=s+1,me=e-1    nextgroup=vimSpecFileMod,vimSubst
  393. syn match vimSpecFile    "#\d\+\|[#%]<\>"        nextgroup=vimSpecFileMod,vimSubst
  394. syn match vimSpecFileMod    "\(:[phtre]\)\+"        contained
  395.  
  396. " User-Specified Commands
  397. syn cluster vimUserCmdList    contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFunction,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
  398. syn keyword vimUserCommand    contained    com[mand]
  399. syn match   vimUserCmd    "\<com\%[mand]!\=\>.*$"        contains=vimUserAttrb,vimUserCommand,@vimUserCmdList
  400. syn match   vimUserAttrb    contained    "-n\%[args]=[01*?+]"    contains=vimUserAttrbKey,vimOper
  401. syn match   vimUserAttrb    contained    "-com\%[plete]=\(augroup\|buffer\|command\|dir\|event\|file\|help\|highlight\|menu\|option\|tag\|var\)"    contains=vimUserAttrbKey,vimUserAttrbCmplt,vimOper
  402. syn match   vimUserAttrb    contained    "-ra\%[nge]\(=%\|=\d\+\)\="    contains=vimNumber,vimOper,vimUserAttrbKey
  403. syn match   vimUserAttrb    contained    "-cou\%[nt]=\d\+"        contains=vimNumber,vimOper,vimUserAttrbKey
  404. syn match   vimUserAttrb    contained    "-b\%[ang]"        contains=vimOper,vimUserAttrbKey
  405. syn match   vimUserAttrb    contained    "-re\%[gister]"        contains=vimOper,vimUserAttrbKey
  406. syn keyword vimUserAttrbKey    contained    b[ang]    cou[nt]    ra[nge]
  407. syn keyword vimUserAttrbKey    contained    com[plete]    n[args]    re[gister]
  408. syn keyword vimUserAttrbCmplt    contained    augroup    dir    help    menu    tag
  409. syn keyword vimUserAttrbCmplt    contained    buffer    event    highlight    option    var
  410. syn keyword vimUserAttrbCmplt    contained    command    file
  411.  
  412. " Numbers
  413. " =======
  414. syn match vimNumber    "\<\d\+\([lL]\|\.\d\+\)\="
  415. syn match vimNumber    "-\d\+\([lL]\|\.\d\+\)\="
  416. syn match vimNumber    "\<0[xX]\x\+"
  417. syn match vimNumber    "#\x\{6}"
  418.  
  419. " Errors
  420. " ======
  421. syn match  vimElseIfErr    "\<else\s\+if\>"
  422.  
  423. " Lower Priority Comments: after some vim commands...
  424. " =======================
  425. syn match  vimComment    excludenl +\s"[^\-:.%#=*].*$+lc=1    contains=@vimCommentGroup,vimCommentString
  426. syn match  vimComment    +\<endif\s\+".*$+lc=5    contains=@vimCommentGroup,vimCommentString
  427. syn match  vimComment    +\<else\s\+".*$+lc=4    contains=@vimCommentGroup,vimCommentString
  428. syn region vimCommentString    contained oneline start='\S\s\+"'ms=s+1    end='"'
  429.  
  430. " Environment Variables
  431. " =====================
  432. syn match vimEnvvar    "\$\I\i*"
  433. syn match vimEnvvar    "\${\I\i*}"
  434.  
  435. " Try to catch strings, if nothing else matches (therefore it must precede the others!)
  436. "  vimEscapeBrace handles ["]  []"] (ie. "s don't terminate string inside [])
  437. syn region vimEscapeBrace    oneline contained transparent    start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
  438. syn match  vimPatSepErr    contained    "\\)"
  439. syn match  vimPatSep    contained    "\\|"
  440. syn region vimPatSepZone    contained transparent matchgroup=vimPatSep start="\\%\=(" skip="\\\\" end="\\)"    contains=@vimStringGroup
  441. syn region vimPatRegion    contained transparent matchgroup=vimPatSep start="\\z\=(" end="\\)"        contains=@vimSubstList oneline
  442. syn match  vimNotPatSep    contained    "\\\\"
  443. syn cluster vimStringGroup    contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone
  444. syn region vimString    oneline keepend    start=+[^:a-zA-Z>!\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+        contains=@vimStringGroup
  445. syn region vimString    oneline keepend    start=+[^:a-zA-Z>!\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+        contains=@vimStringGroup
  446. syn region vimString    oneline    start=+=!+lc=1    skip=+\\\\\|\\!+ end=+!+        contains=@vimStringGroup
  447. syn region vimString    oneline    start="=+"lc=1    skip="\\\\\|\\+" end="+"        contains=@vimStringGroup
  448. syn region vimString    oneline    start="[^\\]+\s*[^a-zA-Z0-9. \t]"lc=1 skip="\\\\\|\\+" end="+"    contains=@vimStringGroup
  449. syn region vimString    oneline    start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/"        contains=@vimStringGroup
  450. syn match  vimString    contained    +"[^"]*\\$+    skipnl nextgroup=vimStringCont
  451. syn match  vimStringCont    contained    +\(\\\\\|.\)\{-}[^\\]"+
  452.  
  453. " Substitutions
  454. " =============
  455. syn cluster vimSubstList    contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
  456. syn cluster vimSubstRepList    contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
  457. syn cluster vimSubstList    add=vimCollection
  458. syn match   vimSubst        "\(:\+\s*\|^\s*\||\s*\)\<s\%[ubstitute]\>"    nextgroup=vimSubstPat
  459. syn match   vimSubst1       contained    "s\%[ubstitute]\>"        nextgroup=vimSubstPat
  460. syn region  vimSubstPat     contained    matchgroup=vimSubstDelim start="\z([^a-zA-Z \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1     contains=@vimSubstList    nextgroup=vimSubstRep4    oneline
  461. syn region  vimSubstRep4    contained    matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList    nextgroup=vimSubstFlagErr
  462. syn region  vimCollection   contained transparent    start="\\\@<!\[" skip="\\\[" end="\]"    contains=vimCollClass
  463. syn match   vimCollClassErr contained    "\[:.\{-\}:\]"
  464. syn match   vimCollClass    contained transparent    "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]"
  465. syn match   vimSubstSubstr  contained    "\\z\=\d"
  466. syn match   vimSubstTwoBS   contained    "\\\\"
  467. syn match   vimSubstFlagErr contained    "[^< \t]\+" contains=vimSubstFlags
  468. syn match   vimSubstFlags   contained    "[&cegiIpr]\+"
  469.  
  470. " Marks, Registers, Addresses, Filters
  471. syn match  vimMark    "[!,:]'[a-zA-Z0-9]"lc=1
  472. syn match  vimMark    "'[a-zA-Z0-9][,!]"me=e-1
  473. syn match  vimMark    "'[<>][,!]"me=e-1
  474. syn match  vimMark    "\<norm\s'[a-zA-Z0-9]"lc=5
  475. syn match  vimMark    "\<normal\s'[a-zA-Z0-9]"lc=7
  476. syn match  vimPlainMark contained    "'[a-zA-Z0-9]"
  477.  
  478. syn match  vimRegister    '[^(,;.]"[a-zA-Z0-9\-:.%#*+=][^a-zA-Z_"]'lc=1,me=e-1
  479. syn match  vimRegister    '\<norm\s\+"[a-zA-Z0-9]'lc=5
  480. syn match  vimRegister    '\<normal\s\+"[a-zA-Z0-9]'lc=7
  481. syn match  vimPlainRegister contained    '"[a-zA-Z0-9\-:.%#*+=]'
  482.  
  483. syn match  vimAddress    ",[.$]"lc=1    skipwhite nextgroup=vimSubst1
  484. syn match  vimAddress    "%\a"me=e-1    skipwhite nextgroup=vimString,vimSubst1
  485.  
  486. syn match  vimFilter contained    "^!.\{-}\(|\|$\)"    contains=vimSpecFile
  487. syn match  vimFilter contained    "\A!.\{-}\(|\|$\)"ms=s+1    contains=vimSpecFile
  488.  
  489. " Complex repeats (:h complex-repeat)
  490. syn match  vimCmplxRepeat        '[^a-zA-Z_/\\]q[0-9a-zA-Z"]'lc=1
  491. syn match  vimCmplxRepeat        '@[0-9a-z".=@:]'
  492.  
  493. " Set command and associated set-options (vimOptions) with comment
  494. syn region vimSet        matchgroup=vimCommand start="\<setlocal\|set\>" end="|"me=e-1 end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString
  495. syn region vimSetEqual  contained    start="="    skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation
  496. syn region vimSetString contained    start=+="+hs=s+1    skip=+\\\\\|\\"+  end=+"+    contains=vimCtrlChar
  497. syn match  vimSetSep    contained    "[,:]"
  498.  
  499. " Let
  500. " ===
  501. syn keyword vimLet        let    unl[et]    skipwhite nextgroup=vimVar
  502.  
  503. " Autocmd
  504. " =======
  505. syn match   vimAutoEventList    contained    "\(!\s\+\)\=\(\a\+,\)*\a\+"    contains=vimAutoEvent nextgroup=vimAutoCmdSpace
  506. syn match   vimAutoCmdSpace    contained    "\s\+"        nextgroup=vimAutoCmdSfxList
  507. syn match   vimAutoCmdSfxList    contained    "\S*"
  508. syn keyword vimAutoCmd        au[tocmd] do[autocmd] doautoa[ll]    skipwhite nextgroup=vimAutoEventList
  509.  
  510. " Echo and Execute -- prefer strings!
  511. " ================
  512. syn region  vimEcho    oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFuncName,vimString,vimOper,varVar
  513. syn region  vimExecute    oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimIsCommand,vimString,vimOper,vimVar,vimNotation
  514. syn match   vimEchoHL    "echohl\="    skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
  515. syn case ignore
  516. syn keyword vimEchoHLNone    none
  517. syn case match
  518.  
  519. " Maps
  520. " ====
  521. syn cluster vimMapGroup    contains=vimMapBang,vimMapLhs,vimMapMod
  522. syn keyword vimMap    cm[ap]    map    om[ap]    skipwhite nextgroup=@vimMapGroup
  523. syn keyword vimMap    cno[remap]    nm[ap]    ono[remap]    skipwhite nextgroup=@vimMapGroup
  524. syn keyword vimMap    im[ap]    nn[oremap]    vm[ap]    skipwhite nextgroup=@vimMapGroup
  525. syn keyword vimMap    ino[remap]    no[remap]    vn[oremap]    skipwhite nextgroup=@vimMapGroup
  526. syn match   vimMapLhs    contained    "\S\+"    contains=vimNotation,vimCtrlChar
  527. syn match   vimMapBang   contained    "!"    skipwhite nextgroup=vimMapLhs
  528. syn match   vimMapMod    contained    "<\([lL]eader\|[pP]lug\|[sS]cript\|[sS][iI][dD]\|[uU]nique\|[sS]ilent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMapGroup
  529. syn case ignore
  530. syn keyword vimMapModKey contained    leader    plug    script    sid    unique    silent
  531. syn case match
  532.  
  533. " Menus
  534. " =====
  535. syn keyword vimCommand    am[enu]    cnoreme[nu]    me[nu]    noreme[nu]    vme[nu]    skipwhite nextgroup=vimMenuPriority,vimMenuName,vimMenuSilent
  536. syn keyword vimCommand    an[oremenu]    ime[nu]    nme[nu]    ome[nu]    vnoreme[nu]    skipwhite nextgroup=vimMenuPriority,vimMenuName,vimMenuSilent
  537. syn keyword vimCommand    cme[nu]    inoreme[nu]    nnoreme[nu]    onoreme[nu]        skipwhite nextgroup=vimMenuPriority,vimMenuName,vimMenuSilent
  538. syn match   vimMenuName    "[^ \t\\<]\+"        contained nextgroup=vimMenuNameMore
  539. syn match   vimMenuPriority    "\d\+\(\.\d\+\)*"        contained skipwhite nextgroup=vimMenuName
  540. syn match   vimMenuNameMore    "\\\s\|<[tT][aA][bB]>\|\\\."    contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
  541. syn match   vimMenuSilent    "<[sS][iI][lL][eE][nN][tT]>"    contained skipwhite nextgroup=vimMenuName,vimMenuPriority
  542.  
  543. " Angle-Bracket Notation (tnx to Michael Geddes)
  544. " ======================
  545. syn case ignore
  546. syn match vimNotation    "\(\\\|<lt>\)\=<\([scam]-\)\{0,4}\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|Help\|Undo\|Insert\|Ins\|k\=Home\|k\=End\|kPlus\|kMinus\|kDivide\|kMultiply\|kEnter\|k\=\(page\)\=\(\|down\|up\)\)>" contains=vimBracket
  547. syn match vimNotation    "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\|drag\|release\)>" contains=vimBracket
  548. syn match vimNotation    "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>"        contains=vimBracket
  549. syn match vimNotation    '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1            contains=vimBracket
  550. syn match vimNotation    '\(\\\|<lt>\)\=<\(line[12]\|count\|bang\|reg\|args\|lt\|[qf]-args\)>'    contains=vimBracket
  551. syn match vimBracket contained    "[\\<>]"
  552. syn case match
  553.  
  554. " Syntax
  555. "=======
  556. syn match   vimGroupList    contained    "@\=[^ \t,]*"    contains=vimGroupSpecial,vimPatSep
  557. syn match   vimGroupList    contained    "@\=[^ \t,]*,"    nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep
  558. syn keyword vimGroupSpecial    contained    ALL    ALLBUT
  559. syn match   vimSynError    contained    "\i\+"
  560. syn match   vimSynError    contained    "\i\+="    nextgroup=vimGroupList
  561. syn match   vimSynContains    contained    "contains="    nextgroup=vimGroupList
  562. syn match   vimSynNextgroup    contained    "nextgroup="    nextgroup=vimGroupList
  563.  
  564. syn match   vimSyntax    "\<sy\%[ntax]\>"        contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  565. syn match   vimAuSyntax    contained    "\s+sy\%[ntax]"    contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
  566.  
  567. " Syntax: case
  568. syn keyword vimSynType    contained    case    skipwhite nextgroup=vimSynCase,vimSynCaseError
  569. syn match   vimSynCaseError    contained    "\i\+"
  570. syn keyword vimSynCase    contained    ignore    match
  571.  
  572. " Syntax: clear
  573. syn keyword vimSynType    contained    clear    skipwhite nextgroup=vimGroupList
  574.  
  575. " Syntax: cluster
  576. syn keyword vimSynType        contained    cluster        skipwhite nextgroup=vimClusterName
  577. syn region  vimClusterName    contained    matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
  578. syn match   vimGroupAdd    contained    "add="        nextgroup=vimGroupList
  579. syn match   vimGroupRem    contained    "remove="    nextgroup=vimGroupList
  580.  
  581. " Syntax: include
  582. syn keyword vimSynType    contained    include        skipwhite nextgroup=vimGroupList
  583.  
  584. " Syntax: keyword
  585. syn keyword vimSynType    contained    keyword        skipwhite nextgroup=vimSynKeyRegion
  586. syn region  vimSynKeyRegion    contained oneline matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimSynNextgroup,vimSynKeyOpt
  587. syn match   vimSynKeyOpt    contained    "\<\(contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
  588.  
  589. " Syntax: match
  590. syn keyword vimSynType    contained    match    skipwhite nextgroup=vimSynMatchRegion
  591. syn region  vimSynMatchRegion    contained oneline keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat
  592. syn match   vimSynMtchOpt    contained    "\<\(transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
  593.  
  594. " Syntax: off and on
  595. syn keyword vimSynType    contained    off    on
  596.  
  597. " Syntax: region
  598. syn cluster vimSynRegPatGroup    contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr
  599. syn keyword vimSynType    contained    region    skipwhite nextgroup=vimSynRegion
  600. syn region  vimSynRegion    contained    matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="$\||" contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
  601. syn match   vimSynRegOpt    contained    "\<\(transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
  602. syn match   vimSynReg    contained    "\(start\|skip\|end\)="he=e-1    nextgroup=vimSynRegPat
  603. syn match   vimSynMtchGrp    contained    "matchgroup="    nextgroup=vimGroup,vimHLGroup
  604. syn region  vimSynRegPat    contained extend    start="\z([[:punct:]]\)"  skip="\\\\\|\\\z1"  end="\z1"  contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
  605. syn match   vimSynPatMod    contained    "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
  606. syn match   vimSynPatMod    contained    "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
  607. syn match   vimSynPatMod    contained    "lc=\d\+"
  608. syn match   vimSynPatMod    contained    "lc=\d\+," nextgroup=vimSynPatMod
  609. syn region  vimSynPatRange    contained    start="\["    skip="\\\\\|\\]"   end="]"
  610. syn match   vimSynNotPatRange    contained    "\\\\\|\\\["
  611. syn match   vimMtchComment    contained    '"[^"]\+$'
  612.  
  613. " Syntax: sync
  614. " ============
  615. syn keyword vimSynType    contained    sync    skipwhite    nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinecont,vimSyncRegion
  616. syn match   vimSyncError    contained    "\i\+"
  617. syn keyword vimSyncC    contained    ccomment    clear    fromstart
  618. syn keyword vimSyncMatch    contained    match    skipwhite    nextgroup=vimSyncGroupName
  619. syn keyword vimSyncRegion    contained    region    skipwhite    nextgroup=vimSynReg
  620. syn keyword vimSyncLinecont    contained    linecont    skipwhite    nextgroup=vimSynRegPat
  621. syn match   vimSyncLines    contained    "\(min\|max\)\=lines="    nextgroup=vimNumber
  622. syn match   vimSyncGroupName    contained    "\k\+"    skipwhite    nextgroup=vimSyncKey
  623. syn match   vimSyncKey    contained    "\<groupthere\|grouphere\>"    skipwhite nextgroup=vimSyncGroup
  624. syn match   vimSyncGroup    contained    "\k\+"    skipwhite    nextgroup=vimSynRegPat,vimSyncNone
  625. syn keyword vimSyncNone    contained    NONE
  626.  
  627. " Additional IsCommand, here by reasons of precedence
  628. " ====================
  629. syn match vimIsCommand    "<Bar>\s*\a\+"    transparent contains=vimCommand,vimNotation
  630.  
  631. " Highlighting
  632. " ============
  633. syn cluster vimHighlightCluster    contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment
  634. syn match   vimHighlight        "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster
  635. syn match   vimHiBang    contained    "!"      skipwhite nextgroup=@vimHighlightCluster
  636.  
  637. syn match   vimHiGroup    contained    "\i\+"
  638. syn case ignore
  639. syn keyword vimHiAttrib    contained    none bold inverse italic reverse standout underline
  640. syn keyword vimFgBgAttrib    contained    none bg background fg foreground
  641. syn case match
  642. syn match   vimHiAttribList    contained    "\i\+"    contains=vimHiAttrib
  643. syn match   vimHiAttribList    contained    "\i\+,"he=e-1    contains=vimHiAttrib nextgroup=vimHiAttribList,vimHiAttrib
  644. syn case ignore
  645. syn keyword vimHiCtermColor    contained    black    darkgray    darkyellow    lightcyan    lightred
  646. syn keyword vimHiCtermColor    contained    blue    darkgreen    gray    lightgray    magenta
  647. syn keyword vimHiCtermColor    contained    brown    darkgrey    green    lightgreen    red
  648. syn keyword vimHiCtermColor    contained    cyan    darkmagenta    grey    lightgrey    white
  649. syn keyword vimHiCtermColor    contained    darkBlue    darkred    lightblue    lightmagenta    yellow
  650. syn keyword vimHiCtermColor    contained    darkcyan
  651. syn case match
  652. syn match   vimHiFontname    contained    "[a-zA-Z\-*]\+"
  653. syn match   vimHiGuiFontname    contained    "'[a-zA-Z\-* ]\+'"
  654. syn match   vimHiGuiRgb    contained    "#\x\{6}"
  655. syn match   vimHiCtermError    contained    "[^0-9]\i*"
  656.  
  657. " Highlighting: hi group key=arg ...
  658. syn cluster vimHiCluster contains=vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation
  659. syn region vimHiKeyList    contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||"    contains=@vimHiCluster
  660. syn match  vimHiKeyError    contained    "\i\+="he=e-1
  661. syn match  vimHiTerm    contained    "[tT][eE][rR][mM]="he=e-1            nextgroup=vimHiAttribList
  662. syn match  vimHiStartStop    contained    "\([sS][tT][aA][rR][tT]\|[sS][tT][oO][pP]\)="he=e-1    nextgroup=vimHiTermcap,vimOption
  663. syn match  vimHiCTerm    contained    "[cC][tT][eE][rR][mM]="he=e-1            nextgroup=vimHiAttribList
  664. syn match  vimHiCtermFgBg    contained    "[cC][tT][eE][rR][mM][fFbB][gG]="he=e-1        nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
  665. syn match  vimHiGui    contained    "[gG][uU][iI]="he=e-1            nextgroup=vimHiAttribList
  666. syn match  vimHiGuiFont    contained    "[fF][oO][nN][tT]="he=e-1            nextgroup=vimHiFontname
  667. syn match  vimHiGuiFgBg    contained    "[gG][uU][iI][fFbB][gG]="he=e-1            nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
  668. syn match  vimHiTermcap    contained    "\S\+"        contains=vimNotation
  669.  
  670. " Highlight: clear
  671. syn keyword vimHiClear    contained    clear        nextgroup=vimHiGroup
  672.  
  673. " Highlight: link
  674. syn region vimHiLink    contained oneline matchgroup=vimCommand start="\<\(def\s\+\)\=link\>\|\<def\>" end="$"    contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
  675.  
  676. " Control Characters
  677. " ==================
  678. syn match vimCtrlChar    "[- -]"
  679.  
  680. " Beginners - Patterns that involve ^
  681. " =========
  682. syn match  vimLineComment    +^[ \t:]*".*$+        contains=@vimCommentGroup,vimCommentString,vimCommentTitle
  683. syn match  vimCommentTitle    '"\s*\u\a*\(\s\+\u\a*\)*:'hs=s+1    contained contains=vimCommentTitleLeader,vimTodo
  684. syn match  vimContinue    "^\s*\\"
  685. syn match  vimCommentTitleLeader    '"\s\+'ms=s+1        contained
  686.  
  687. " Scripts
  688. " =======
  689.  
  690. " [-- python --]
  691. if filereadable(expand("<sfile>:p:h")."/python.vim")
  692.   syn include @vimPythonScript <sfile>:p:h/python.vim
  693.   syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
  694.   syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
  695. endif
  696.  
  697. " [-- tcl --]
  698. if filereadable(expand("<sfile>:p:h")."/tcl.vim")
  699.   syn include @vimTclScript <sfile>:p:h/tcl.vim
  700.   syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
  701.   syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
  702. endif
  703.  
  704. " Synchronize (speed)
  705. "============
  706. syn sync linecont    "^\s\+\\"
  707. syn sync minlines=10    maxlines=100
  708. syn sync match vimAugroupSyncA    groupthere NONE    "\<aug\%[roup]\>\s\+[eE][nN][dD]"
  709.  
  710. " Highlighting Settings
  711. " ====================
  712.  
  713. " The default highlighting.
  714. hi def link vimAuHighlight    vimHighlight
  715. hi def link vimSubst1    vimSubst
  716. hi def link vimBehaveModel    vimBehave
  717.  
  718. hi def link vimAddress    vimMark
  719. hi def link vimAugroupKey    vimCommand
  720. "  hi def link vimAugroupError    vimError
  721. hi def link vimAutoCmd    vimCommand
  722. hi def link vimAutoCmdOpt    vimOption
  723. hi def link vimAutoSet    vimCommand
  724. hi def link vimBehave    vimCommand
  725. hi def link vimBehaveError    vimError
  726. hi def link vimCollClassErr    vimError
  727. hi def link vimCommentString    vimString
  728. hi def link vimCondHL    vimCommand
  729. hi def link vimEchoHL    vimCommand
  730. hi def link vimEchoHLNone    vimGroup
  731. hi def link vimElseif    vimCondHL
  732. hi def link vimErrSetting    vimError
  733. hi def link vimFgBgAttrib    vimHiAttrib
  734. hi def link vimFTCmd    vimCommand
  735. hi def link vimFTOption    vimSynType
  736. hi def link vimFTError    vimError
  737. hi def link vimFunctionError    vimError
  738. hi def link vimFuncKey    vimCommand
  739. hi def link vimGroupAdd    vimSynOption
  740. hi def link vimGroupRem    vimSynOption
  741. hi def link vimHLGroup    vimGroup
  742. hi def link vimHiAttribList    vimError
  743. hi def link vimHiCTerm    vimHiTerm
  744. hi def link vimHiCtermError    vimError
  745. hi def link vimHiCtermFgBg    vimHiTerm
  746. hi def link vimHiGroup    vimGroupName
  747. hi def link vimHiGui    vimHiTerm
  748. hi def link vimHiGuiFgBg    vimHiTerm
  749. hi def link vimHiGuiFont    vimHiTerm
  750. hi def link vimHiGuiRgb    vimNumber
  751. hi def link vimHiKeyError    vimError
  752. hi def link vimHiStartStop    vimHiTerm
  753. hi def link vimHighlight    vimCommand
  754. hi def link vimInsert    vimString
  755. hi def link vimKeyCode    vimSpecFile
  756. hi def link vimKeyCodeError    vimError
  757. hi def link vimLet    vimCommand
  758. hi def link vimLineComment    vimComment
  759. hi def link vimMap    vimCommand
  760. hi def link vimMapMod    vimBracket
  761. hi def link vimMapModErr    vimError
  762. hi def link vimMapModKey    vimFuncSID
  763. hi def link vimMapBang    vimCommand
  764. hi def link vimMenuNameMore    vimMenuName
  765. hi def link vimMtchComment    vimComment
  766. hi def link vimNotFunc    vimCommand
  767. hi def link vimNotPatSep    vimString
  768. hi def link vimPatSepErr    vimPatSep
  769. hi def link vimPlainMark    vimMark
  770. hi def link vimPlainRegister    vimRegister
  771. hi def link vimSetString    vimString
  772. hi def link vimSpecFileMod    vimSpecFile
  773. hi def link vimStringCont    vimString
  774. hi def link vimSubst    vimCommand
  775. hi def link vimSubstFlagErr    vimError
  776. hi def link vimSynCaseError    vimError
  777. hi def link vimSynContains    vimSynOption
  778. hi def link vimSynKeyOpt    vimSynOption
  779. hi def link vimSynMtchGrp    vimSynOption
  780. hi def link vimSynMtchOpt    vimSynOption
  781. hi def link vimSynNextgroup    vimSynOption
  782. hi def link vimSynNotPatRange    vimSynRegPat
  783. hi def link vimSynPatRange    vimString
  784. hi def link vimSynRegOpt    vimSynOption
  785. hi def link vimSynRegPat    vimString
  786. hi def link vimSyntax    vimCommand
  787. hi def link vimSynType    vimSpecial
  788. hi def link vimSyncGroup    vimGroupName
  789. hi def link vimSyncGroupName    vimGroupName
  790. hi def link vimUserAttrb    vimSpecial
  791. hi def link vimUserAttrbCmplt    vimSpecial
  792. hi def link vimUserAttrbKey    vimOption
  793. hi def link vimUserCommand    vimCommand
  794.  
  795. hi def link vimAutoEvent    Type
  796. hi def link vimBracket    Delimiter
  797. hi def link vimCmplxRepeat    SpecialChar
  798. hi def link vimCommand    Statement
  799. hi def link vimComment    Comment
  800. hi def link vimCommentTitle    PreProc
  801. hi def link vimContinue    Special
  802. hi def link vimCtrlChar    SpecialChar
  803. hi def link vimElseIfErr    Error
  804. hi def link vimEnvvar    PreProc
  805. hi def link vimError    Error
  806. hi def link vimFuncName    Function
  807. hi def link vimFuncSID    Special
  808. hi def link vimFuncVar    Identifier
  809. hi def link vimGroup    Type
  810. hi def link vimGroupSpecial    Special
  811. hi def link vimHLMod    PreProc
  812. hi def link vimHiAttrib    PreProc
  813. hi def link vimHiTerm    Type
  814. hi def link vimKeyword    Statement
  815. hi def link vimMark    Number
  816. hi def link vimMenuName    PreProc
  817. hi def link vimNotation    Special
  818. hi def link vimNumber    Number
  819. hi def link vimOper    Operator
  820. hi def link vimOption    PreProc
  821. hi def link vimPatSep    SpecialChar
  822. hi def link vimPattern    Type
  823. hi def link vimRegister    SpecialChar
  824. hi def link vimSep    Delimiter
  825. hi def link vimSetSep    Statement
  826. hi def link vimSpecFile    Identifier
  827. hi def link vimSpecial    Type
  828. hi def link vimStatement    Statement
  829. hi def link vimString    String
  830. hi def link vimSubstDelim    Delimiter
  831. hi def link vimSubstFlags    Special
  832. hi def link vimSubstSubstr    SpecialChar
  833. hi def link vimSynCase    Type
  834. hi def link vimSynCaseError    Error
  835. hi def link vimSynError    Error
  836. hi def link vimSynOption    Special
  837. hi def link vimSynReg    Type
  838. hi def link vimSyncC    Type
  839. hi def link vimSyncError    Error
  840. hi def link vimSyncKey    Type
  841. hi def link vimSyncNone    Type
  842. hi def link vimTodo    Todo
  843. hi def link vimScriptDelim    Comment
  844.  
  845. let b:current_syntax = "vim"
  846.  
  847. " vim: ts=18
  848.